<!DOCTYPE html>
<html lang="zh-CN">

<!-- Mirrored from www.mdui.org/docs/appbar by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 22 Jan 2022 13:02:18 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  <meta name="renderer" content="webkit"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=5.0">
  <meta http-equiv="Cache-Control" content="no-siteapp"/>
  <title>应用栏 - MDUI 开发文档, Material Design 前端框架</title>
  <meta name="description" content="currentItem.description" />
  <link rel="preconnect" href="http://cdn.w3cbus.com/">
  <link rel="stylesheet" href="../../cdn.w3cbus.com/library/mdui/1.0.2/css/mdui.min.css"><link rel="stylesheet" href="../../cdn.w3cbus.com/mdui/docs_1/static/index.0132e177.css">
  
  <!-- Google Tag Manager -->
  <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  '../../www.googletagmanager.com/gtm5445.html?id='+i+dl;f.parentNode.insertBefore(j,f);
  })(window,document,'script','dataLayer','GTM-K3T2R6S');</script>
  <!-- End Google Tag Manager -->
  <script type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"mdui官网","item":"https://www.mdui.org"},{"@type":"ListItem","position":2,"name":"mdui v1文档","item":"https://www.mdui.org/docs/"},{"@type":"ListItem","position":3,"name":"应用栏"}]}</script>
  <script async src="../../pagead2.googlesyndication.com/pagead/js/adsbygooglee7db.js?client=ca-pub-4466345895756968" crossorigin="anonymous"></script>
</head>
<body
  class="
    mdui-drawer-body-left
    mdui-appbar-with-toolbar
    mdui-theme-primary-indigo
    mdui-theme-accent-pink
    mdui-theme-layout-auto"
  id="p-d"
>
<header class="appbar mdui-appbar mdui-appbar-fixed">
  <div class="mdui-toolbar mdui-color-theme">
    <span
      class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white"
      mdui-drawer="{target: '#main-drawer', swipe: true}"
    >
      <i class="mdui-icon material-icons">menu</i>
    </span>
    <a href="https://www.mdui.org/" class="mdui-typo-headline mdui-hidden-xs">MDUI</a>
    <a href="index.html" class="mdui-typo-title">文档</a>
    <div class="mdui-toolbar-spacer"></div>
    <span
      class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white"
      mdui-dialog="{target: '#dialog-docs-theme'}"
      mdui-tooltip="{content: '设置主题'}"
    >
      <i class="mdui-icon material-icons">color_lens</i>
    </span>
    <a
      href="https://github.com/zdhxiong/mdui"
      target="_blank"
      class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white"
      mdui-tooltip="{content: '查看 Github'}"
    >
      <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 36 36" enable-background="new 0 0 36 36" xml:space="preserve" class="mdui-icon" style="width: 24px;height:24px;">
        <path fill-rule="evenodd" clip-rule="evenodd" fill="#ffffff" d="M18,1.4C9,1.4,1.7,8.7,1.7,17.7c0,7.2,4.7,13.3,11.1,15.5c0.8,0.1,1.1-0.4,1.1-0.8c0-0.4,0-1.4,0-2.8c-4.5,1-5.5-2.2-5.5-2.2c-0.7-1.9-1.8-2.4-1.8-2.4c-1.5-1,0.1-1,0.1-1c1.6,0.1,2.5,1.7,2.5,1.7c1.5,2.5,3.8,1.8,4.7,1.4c0.1-1.1,0.6-1.8,1-2.2c-3.6-0.4-7.4-1.8-7.4-8.1c0-1.8,0.6-3.2,1.7-4.4c-0.2-0.4-0.7-2.1,0.2-4.3c0,0,1.4-0.4,4.5,1.7c1.3-0.4,2.7-0.5,4.1-0.5c1.4,0,2.8,0.2,4.1,0.5c3.1-2.1,4.5-1.7,4.5-1.7c0.9,2.2,0.3,3.9,0.2,4.3c1,1.1,1.7,2.6,1.7,4.4c0,6.3-3.8,7.6-7.4,8c0.6,0.5,1.1,1.5,1.1,3c0,2.2,0,3.9,0,4.5c0,0.4,0.3,0.9,1.1,0.8c6.5-2.2,11.1-8.3,11.1-15.5C34.3,8.7,27,1.4,18,1.4z"></path>
      </svg>
    </a>
  </div>
</header>
<div class="mdui-drawer" id="main-drawer">
  <div class="mdui-list" mdui-collapse="{accordion: true}" style="margin-bottom: 76px;">
    <div class="
          mdui-collapse-item
          "
        >
          <div class="mdui-collapse-item-header mdui-list-item mdui-ripple">
            <i class="
              mdui-list-item-icon
              mdui-icon
              material-icons
              mdui-text-color-blue"
            >near_me</i>
            <div class="mdui-list-item-content">开始使用</div>
            <i class="mdui-collapse-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
          </div>
          <div class="mdui-collapse-item-body mdui-list">
            <a
                  href="introduction.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >简介</a><a
                  href="download.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >下载</a><a
                  href="compatibility.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >兼容性</a><a
                  href="jq.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >JavaScript 工具库</a><a
                  href="global.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >JavaScript 全局方法</a><a
                  href="migration.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >从 0.4.3 升级到 1.0.0</a>
          </div>
        </div><div class="
          mdui-collapse-item
          "
        >
          <div class="mdui-collapse-item-header mdui-list-item mdui-ripple">
            <i class="
              mdui-list-item-icon
              mdui-icon
              material-icons
              mdui-text-color-deep-orange"
            >layers</i>
            <div class="mdui-list-item-content">样式</div>
            <i class="mdui-collapse-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
          </div>
          <div class="mdui-collapse-item-body mdui-list">
            <a
                  href="color.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >颜色与主题</a><a
                  href="font.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >字体</a><a
                  href="grid.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >网格布局</a><a
                  href="typo.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >排版</a><a
                  href="icon.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >图标</a><a
                  href="media.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >媒体</a><a
                  href="helper.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >辅助类</a><a
                  href="shadow.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >阴影</a>
          </div>
        </div><div class="
          mdui-collapse-item
          mdui-collapse-item-open"
        >
          <div class="mdui-collapse-item-header mdui-list-item mdui-ripple">
            <i class="
              mdui-list-item-icon
              mdui-icon
              material-icons
              mdui-text-color-green"
            >widgets</i>
            <div class="mdui-list-item-content">组件</div>
            <i class="mdui-collapse-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
          </div>
          <div class="mdui-collapse-item-body mdui-list">
            <a
                  href="ripple.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >涟漪动画效果</a><a
                  href="button.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >按钮</a><a
                  href="fab.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >浮动操作按钮</a><a
                  href="select.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >下拉选择</a><a
                  href="divider.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >分隔线</a><a
                  href="panel.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >可扩展面板</a><a
                  href="textfield.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >文本框</a><a
                  href="selection_control.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >选择控件</a><a
                  href="slider.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >滑块</a><a
                  href="list.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >列表</a><a
                  href="list_control.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >列表控制</a><a
                  href="grid_list.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >网格列表</a><a
                  href="tab.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >Tab 选项卡</a><a
                  href="toolbar.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >工具栏</a><a
                  href="appbar.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    mdui-list-item-active"
                >应用栏</a><a
                  href="drawer.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >抽屉式导航</a><a
                  href="bottom_nav.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >底部导航栏</a><a
                  href="card.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >卡片</a><a
                  href="chip.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >纸片</a><a
                  href="tooltip.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >工具提示</a><a
                  href="snackbar.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >Snackbar</a><a
                  href="table.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >表格</a><a
                  href="dialog.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >对话框</a><a
                  href="menu.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >菜单</a><a
                  href="progress.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >进度指示器</a>
          </div>
        </div><div class="
          mdui-collapse-item
          "
        >
          <div class="mdui-collapse-item-header mdui-list-item mdui-ripple">
            <i class="
              mdui-list-item-icon
              mdui-icon
              material-icons
              mdui-text-color-brown"
            >view_carousel</i>
            <div class="mdui-list-item-content">JavaScript 插件</div>
            <i class="mdui-collapse-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
          </div>
          <div class="mdui-collapse-item-body mdui-list">
            <a
                  href="collapse.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >Collapse</a><a
                  href="headroom.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >Headroom</a>
          </div>
        </div><div class="
          mdui-collapse-item
          "
        >
          <div class="mdui-collapse-item-header mdui-list-item mdui-ripple">
            <i class="
              mdui-list-item-icon
              mdui-icon
              material-icons
              mdui-text-color-purple"
            >local_mall</i>
            <div class="mdui-list-item-content">资源</div>
            <i class="mdui-collapse-item-arrow mdui-icon material-icons">keyboard_arrow_down</i>
          </div>
          <div class="mdui-collapse-item-body mdui-list">
            <a
                  href="material_icon.html"
                  class="
                    mdui-list-item
                    mdui-ripple
                    "
                >Material 图标</a>
          </div>
        </div>
  </div>
</div>
<a id="anchor-top"></a>


<div class="container p-appbar mdui-container">
  <h1 class="title mdui-text-color-theme">应用栏</h1>
  <div class="intro mdui-typo">
    <p>应用栏通常位于页面顶部，可以包含工具栏、Tab 选项卡等组件。一个页面只能有一个应用栏。</p>

    <ins class="adsbygoogle"
  style="display:block;margin-top: 40px;"
  data-ad-client="ca-pub-4466345895756968"
  data-ad-slot="3103002934"
  
  
  data-ad-format="auto"
  data-full-width-responsive="true"
></ins>
  <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
      </script>

    <div class="intro-module">
      <h3>调用方式</h3>
      <p>应用栏组件使用纯 CSS 编写，只需编写 HTML 代码即可生效。</p>
    </div>
    <div class="intro-module">
      <h3>色彩</h3>
      <p>应用栏不含背景色。可以为应用栏的子元素（工具栏、Tab 选项卡等）设置背景色。</p>
    </div>
    <div class="intro-module">
      <h3>相关阅读</h3>
      <p><a href="http://www.mdui.org/design/layout/structure.html#structure-app-bar" target="_blank">Material Design 设计指南：结构 - 应用栏</a></p>
    </div>
  </div>

  <nav class="toc mdui-text-color-theme">
    <ul>
      <li>
        <a href="#style">样式</a>
        <ul>
          <li><a href="#toolbar">仅含工具栏</a></li>
          <li><a href="#tab">仅含 Tab 选项卡</a></li>
          <li><a href="#toolbar-tab">含工具栏和 Tab 选项卡</a></li>
          <li><a href="#transparent">透明背景</a></li>
          <li><a href="#fixed">固定到页面顶部</a></li>
          <li><a href="#hide">自动隐藏应用栏</a></li>
          <li><a href="#toolbar-hide">自动隐藏应用栏中的工具栏</a></li>
        </ul>
      </li>
      <li><a href="#class">CSS 类名列表</a></li>
    </ul>
  </nav>

  <div class="chapter">
    <div class="mdui-typo">
      <h2 class="chapter-title chapter-title-first mdui-text-color-theme">样式 <a class="anchor" id="style"></a></h2>

      <ins class="adsbygoogle"
  style="display:block;margin-bottom: 30px;"
  data-ad-client="ca-pub-4466345895756968"
  data-ad-slot="6410619709"
  
  
  data-ad-format="auto"
  data-full-width-responsive="true"
></ins>
  <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
      </script>

      <h4 class="article-title">仅含工具栏 <a class="anchor" id="toolbar"></a></h4>
    </div>
    <div class="example">
      <div class="example-tools">
  <a href="javascript:;" class="viewsource" mdui-tooltip="{content: '查看代码'}">
        <i class="mdui-icon material-icons">code</i>
      </a>
  <a href="appbar/demo1.html" target="_blank" mdui-tooltip="{content: '在线调试'}">
        <i class="mdui-icon material-icons">play_arrow</i>
      </a>
</div>
<div class="example-demo-label">Example</div>
      <div class="example-demo">
        <div class="mdui-appbar" style="position: relative;">
          <div class="mdui-toolbar mdui-color-theme">
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">menu</i>
            </a>
            <a href="javascript:;" class="mdui-typo-headline">MDUI</a>
            <a href="javascript:;" class="mdui-typo-title">Title</a>
            <div class="mdui-toolbar-spacer"></div>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">search</i>
            </a>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">refresh</i>
            </a>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">more_vert</i>
            </a>
          </div>
        </div>
      </div>
      <pre class="example-code"><code class="language-html">&lt;div class=&quot;mdui-appbar&quot;&gt;
  &lt;div class=&quot;mdui-toolbar mdui-color-theme&quot;&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;menu&lt;/i&gt;
    &lt;/a&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-typo-headline&quot;&gt;MDUI&lt;/a&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-typo-title&quot;&gt;Title&lt;/a&gt;
    &lt;div class=&quot;mdui-toolbar-spacer&quot;&gt;&lt;/div&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;search&lt;/i&gt;
    &lt;/a&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;refresh&lt;/i&gt;
    &lt;/a&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;more_vert&lt;/i&gt;
    &lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
    </div>

    <div class="mdui-typo">
      <h4 class="article-title">仅含 Tab 选项卡 <a class="anchor" id="tab"></a></h4>
    </div>
    <div class="example">
      <div class="example-tools">
  <a href="javascript:;" class="viewsource" mdui-tooltip="{content: '查看代码'}">
        <i class="mdui-icon material-icons">code</i>
      </a>
  <a href="appbar/demo2.html" target="_blank" mdui-tooltip="{content: '在线调试'}">
        <i class="mdui-icon material-icons">play_arrow</i>
      </a>
</div>
<div class="example-demo-label">Example</div>
      <div class="example-demo">
        <div class="mdui-appbar" style="position: relative;">
          <div class="mdui-tab mdui-color-theme" mdui-tab>
            <a href="#example3-tab1" class="mdui-ripple mdui-ripple-white">web</a>
            <a href="#example3-tab2" class="mdui-ripple mdui-ripple-white">shopping</a>
            <a href="#example3-tab3" class="mdui-ripple mdui-ripple-white">videos</a>
          </div>
        </div>
      </div>
      <pre class="example-code"><code class="language-html">&lt;div class=&quot;mdui-appbar&quot;&gt;
  &lt;div class=&quot;mdui-tab mdui-color-theme&quot; mdui-tab&gt;
    &lt;a href=&quot;#example3-tab1&quot; class=&quot;mdui-ripple mdui-ripple-white&quot;&gt;web&lt;/a&gt;
    &lt;a href=&quot;#example3-tab2&quot; class=&quot;mdui-ripple mdui-ripple-white&quot;&gt;shopping&lt;/a&gt;
    &lt;a href=&quot;#example3-tab3&quot; class=&quot;mdui-ripple mdui-ripple-white&quot;&gt;videos&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
    </div>

    <div class="mdui-typo">
      <h4 class="article-title">含工具栏和 Tab 选项卡 <a class="anchor" id="toolbar-tab"></a></h4>
    </div>
    <div class="example">
      <div class="example-tools">
  <a href="javascript:;" class="viewsource" mdui-tooltip="{content: '查看代码'}">
        <i class="mdui-icon material-icons">code</i>
      </a>
  <a href="appbar/demo3.html" target="_blank" mdui-tooltip="{content: '在线调试'}">
        <i class="mdui-icon material-icons">play_arrow</i>
      </a>
</div>
<div class="example-demo-label">Example</div>
      <div class="example-demo">
        <div class="mdui-appbar" style="position: relative;">
          <div class="mdui-toolbar mdui-color-theme">
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">menu</i>
            </a>
            <a href="javascript:;" class="mdui-typo-title">Title</a>
            <div class="mdui-toolbar-spacer"></div>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">search</i>
            </a>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">refresh</i>
            </a>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">more_vert</i>
            </a>
          </div>
          <div class="mdui-tab mdui-color-theme" mdui-tab>
            <a href="#example3-tab1" class="mdui-ripple mdui-ripple-white">web</a>
            <a href="#example3-tab2" class="mdui-ripple mdui-ripple-white">shopping</a>
            <a href="#example3-tab3" class="mdui-ripple mdui-ripple-white">videos</a>
          </div>
        </div>
      </div>
      <pre class="example-code"><code class="language-html">&lt;div class=&quot;mdui-appbar&quot;&gt;
  &lt;div class=&quot;mdui-toolbar mdui-color-theme&quot;&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;menu&lt;/i&gt;
    &lt;/a&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-typo-title&quot;&gt;Title&lt;/a&gt;
    &lt;div class=&quot;mdui-toolbar-spacer&quot;&gt;&lt;/div&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;search&lt;/i&gt;
    &lt;/a&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;refresh&lt;/i&gt;
    &lt;/a&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;more_vert&lt;/i&gt;
    &lt;/a&gt;
  &lt;/div&gt;
  &lt;div class=&quot;mdui-tab mdui-color-theme&quot; mdui-tab&gt;
    &lt;a href=&quot;#example3-tab1&quot; class=&quot;mdui-ripple mdui-ripple-white&quot;&gt;web&lt;/a&gt;
    &lt;a href=&quot;#example3-tab1&quot; class=&quot;mdui-ripple mdui-ripple-white&quot;&gt;shopping&lt;/a&gt;
    &lt;a href=&quot;#example3-tab1&quot; class=&quot;mdui-ripple mdui-ripple-white&quot;&gt;videos&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
    </div>
    <div class="example">
      <div class="example-tools">
  <a href="javascript:;" class="viewsource" mdui-tooltip="{content: '查看代码'}">
        <i class="mdui-icon material-icons">code</i>
      </a>
  <a href="appbar/demo4.html" target="_blank" mdui-tooltip="{content: '在线调试'}">
        <i class="mdui-icon material-icons">play_arrow</i>
      </a>
</div>
<div class="example-demo-label">Example</div>
      <div class="example-demo">
        <div class="mdui-appbar" style="position: relative;">
          <div class="mdui-toolbar mdui-color-theme">
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">menu</i>
            </a>
            <a href="javascript:;" class="mdui-typo-title">Title</a>
            <div class="mdui-toolbar-spacer"></div>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">search</i>
            </a>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">refresh</i>
            </a>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">more_vert</i>
            </a>
          </div>
          <div class="mdui-tab mdui-color-theme" mdui-tab>
            <a href="#example6-tab1" class="mdui-ripple mdui-ripple-white">
              <i class="mdui-icon material-icons">phone</i>
              <label>recents</label>
            </a>
            <a href="#example6-tab2" class="mdui-ripple mdui-ripple-white">
              <i class="mdui-icon material-icons">favorite</i>
              <label>favorites</label>
            </a>
            <a href="#example6-tab3" class="mdui-ripple mdui-ripple-white">
              <i class="mdui-icon material-icons">perm_contact_calendar</i>
              <label>nearby</label>
            </a>
          </div>
        </div>
      </div>
      <pre class="example-code"><code class="language-html">&lt;div class=&quot;mdui-appbar&quot;&gt;
  &lt;div class=&quot;mdui-toolbar mdui-color-theme&quot;&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;menu&lt;/i&gt;
    &lt;/a&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-typo-title&quot;&gt;Title&lt;/a&gt;
    &lt;div class=&quot;mdui-toolbar-spacer&quot;&gt;&lt;/div&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;search&lt;/i&gt;
    &lt;/a&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;refresh&lt;/i&gt;
    &lt;/a&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;more_vert&lt;/i&gt;
    &lt;/a&gt;
  &lt;/div&gt;
  &lt;div class=&quot;mdui-tab mdui-color-theme&quot; mdui-tab&gt;
    &lt;a href=&quot;#example6-tab1&quot; class=&quot;mdui-ripple mdui-ripple-white&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;phone&lt;/i&gt;
      &lt;label&gt;recents&lt;/label&gt;
    &lt;/a&gt;
    &lt;a href=&quot;#example6-tab2&quot; class=&quot;mdui-ripple mdui-ripple-white&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;favorite&lt;/i&gt;
      &lt;label&gt;favorites&lt;/label&gt;
    &lt;/a&gt;
    &lt;a href=&quot;#example6-tab3&quot; class=&quot;mdui-ripple mdui-ripple-white&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;perm_contact_calendar&lt;/i&gt;
      &lt;label&gt;nearby&lt;/label&gt;
    &lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
    </div>

    <div class="mdui-typo">
      <h4 class="article-title">透明背景 <a class="anchor" id="transparent"></a></h4>
      <p>需要添加类 <code>.mdui-shadow-0</code> 取消应用栏的阴影。</p>
    </div>
    <div class="example">
      <div class="example-tools">
  <a href="javascript:;" class="viewsource" mdui-tooltip="{content: '查看代码'}">
        <i class="mdui-icon material-icons">code</i>
      </a>
  <a href="appbar/demo5.html" target="_blank" mdui-tooltip="{content: '在线调试'}">
        <i class="mdui-icon material-icons">play_arrow</i>
      </a>
</div>
<div class="example-demo-label">Example</div>
      <div class="example-demo">
        <div class="mdui-appbar mdui-shadow-0" style="position: relative;">
          <div class="mdui-toolbar">
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">menu</i>
            </a>
            <a href="javascript:;" class="mdui-typo-title">Title</a>
            <div class="mdui-toolbar-spacer"></div>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">search</i>
            </a>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">refresh</i>
            </a>
            <a href="javascript:;" class="mdui-btn mdui-btn-icon">
              <i class="mdui-icon material-icons">more_vert</i>
            </a>
          </div>
        </div>
      </div>
      <pre class="example-code"><code class="language-html">&lt;div class=&quot;mdui-appbar mdui-shadow-0&quot;&gt;
  &lt;div class=&quot;mdui-toolbar&quot;&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;menu&lt;/i&gt;
    &lt;/a&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-typo-title&quot;&gt;Title&lt;/a&gt;
    &lt;div class=&quot;mdui-toolbar-spacer&quot;&gt;&lt;/div&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;search&lt;/i&gt;
    &lt;/a&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;refresh&lt;/i&gt;
    &lt;/a&gt;
    &lt;a href=&quot;javascript:;&quot; class=&quot;mdui-btn mdui-btn-icon&quot;&gt;
      &lt;i class=&quot;mdui-icon material-icons&quot;&gt;more_vert&lt;/i&gt;
    &lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;</code></pre>
    </div>

    <div class="mdui-typo">
      <h4 class="article-title">固定到页面顶部 <a class="anchor" id="fixed"></a></h4>
      <p>在 <code>&lt;div class=&quot;mdui-appbar&quot;&gt;&lt;/div&gt;</code> 上添加类 <code>.mdui-appbar-fixed</code> 可以将应用栏固定在页面顶部，不随滚动条滚动。</p>
      <p>为了使应用栏不覆盖页面内容，需要在 <code>body</code> 上添加类来为 <code>body</code> 添加 <code>padding-top</code>：</p>
      <ul>
        <li><code>.mdui-appbar-with-toolbar</code>：应用栏中含工具栏时需要添加该类。</li>
        <li><code>.mdui-appbar-with-tab</code>：应用栏中含 Tab 选项卡时需要添加该类。</li>
        <li><code>.mdui-appbar-with-tab-larger</code>：应用栏中含同时又图标和文本的 Tab 选项卡时需要添加该类。</li>
      </ul>
      <p>如果应用栏中有除了工具栏和 Tab 选项卡外的其他元素，需要你自己为 <code>body</code> 添加适当的 <code>padding-top</code>。</p>
    </div>
    <a href="appbar/demo6.html" target="_blank" class="mdui-btn mdui-color-theme-accent mdui-m-r-1">示例 1</a>
    <a href="appbar/demo7.html" target="_blank" class="mdui-btn mdui-color-theme-accent mdui-m-r-1">示例 2</a>
    <a href="appbar/demo8.html" target="_blank" class="mdui-btn mdui-color-theme-accent mdui-m-r-1">示例 3</a>

    <div class="mdui-typo">
      <h4 class="article-title">自动隐藏应用栏 <a class="anchor" id="hide"></a></h4>
      <p>在 <code>&lt;div class=&quot;mdui-appbar&quot;&gt;&lt;/div&gt;</code> 上添加类 <code>.mdui-appbar-scroll-hide</code> 可以在页面向下滚动时隐藏应用栏，页面向上滚动时显示应用栏。</p>
      <p>若元素是动态生成的，则需要调用 <a href="global.html#mutation"><code>mdui.mutation()</code></a> 进行初始化。</p>
      <pre><code class="language-html">&lt;body class=&quot;mdui-appbar-with-toolbar&quot;&gt;
  &lt;div class=&quot;mdui-appbar mdui-appbar-fixed mdui-appbar-scroll-hide&quot;&gt;
    &lt;div class=&quot;mdui-toolbar&quot;&gt;
      ......
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/body&gt;</code></pre>
    </div>
    <a href="appbar/demo9.html" target="_blank" class="mdui-btn mdui-color-pink-accent">运行</a>

    <div class="mdui-typo">
      <h4 class="article-title">自动隐藏应用栏中的工具栏 <a class="anchor" id="toolbar-hide"></a></h4>
      <p>在 <code>&lt;div class=&quot;mdui-appbar&quot;&gt;&lt;/div&gt;</code> 上添加类 <code>.mdui-appbar-scroll-toolbar-hide</code>，在应用栏中同时含有工具栏和 Tab 选项卡时，在页面向下滚动时隐藏工具栏，向上滚动时显示工具栏。</p>
      <p>若元素是动态生成的，则需要调用 <a href="global.html#mutation"><code>mdui.mutation()</code></a> 进行初始化。</p>
      <pre><code class="language-html">&lt;body class=&quot;mdui-appbar-with-toolbar mdui-appbar-with-tab&quot;&gt;
  &lt;div class=&quot;mdui-appbar mdui-appbar-fixed mdui-appbar-scroll-toolbar-hide&quot;&gt;
    &lt;div class=&quot;mdui-toolbar&quot;&gt;
      ......
    &lt;/div&gt;
    &lt;div class=&quot;mdui-tab&quot;&gt;
      ......
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/body&gt;</code></pre>
    </div>
    <a href="appbar/demo10.html" target="_blank" class="mdui-btn mdui-color-pink-accent">运行</a>


    <div class="mdui-typo">
      <h2 class="chapter-title mdui-text-color-theme">CSS 类名列表 <a class="anchor" id="class"></a></h2>

      <ins class="adsbygoogle"
  style="display:block;margin-bottom: 30px;"
  data-ad-client="ca-pub-4466345895756968"
  data-ad-slot="6410619709"
  
  
  data-ad-format="auto"
  data-full-width-responsive="true"
></ins>
  <script>
        (adsbygoogle = window.adsbygoogle || []).push({});
      </script>

      <div class="mdui-table-fluid">
        <table class="mdui-table">
          <thead>
            <tr>
              <th>类名</th>
              <th>效果</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td><code>.mdui-appbar</code></td>
              <td>定义一个应用栏。</td>
            </tr>
            <tr>
              <td><code>.mdui-appbar-fixed</code></td>
              <td>使应用栏固定到页面顶部。</td>
            </tr>
            <tr>
              <td><code>.mdui-appbar-with-toolbar</code></td>
              <td>应用栏中含工具栏时需要在 <code>body</code> 上添加该类</td>
            </tr>
            <tr>
              <td><code>.mdui-appbar-with-tab</code></td>
              <td>应用栏中含 Tab 选项卡时需要在 <code>body</code> 上添加该类</td>
            </tr>
            <tr>
              <td><code>.mdui-appbar-with-tab-larger</code></td>
              <td>应用栏中含同时又图标和文本的 Tab 选项卡时需要在 <code>body</code> 上添加该类</td>
            </tr>
            <tr>
              <td><code>.mdui-appbar-scroll-hide</code></td>
              <td>在页面向下滚动时隐藏应用栏，向上滚动时显示应用栏。</td>
            </tr>
            <tr>
              <td><code>.mdui-appbar-scroll-toolbar-hide</code></td>
              <td>在应用栏中同时含有工具栏和 Tab 选项卡时，页面向下滚动时隐藏工具栏，向上滚动时显示工具栏。</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div>

<div class="footer-nav mdui-color-theme">
  <div class="mdui-container">
    <div class="mdui-row">

      <a href="toolbar.html" class="mdui-ripple mdui-color-theme mdui-col-xs-2 mdui-col-sm-6 footer-nav-left">
            <div class="footer-nav-text">
              <i class="mdui-icon material-icons">arrow_back</i>
              <span class="footer-nav-direction mdui-hidden-xs-down">Previous</span>
              <div class="footer-nav-chapter mdui-hidden-xs-down">工具栏</div>
            </div>
          </a>

      <a href="drawer.html" class="mdui-ripple mdui-color-theme mdui-col-xs-10 mdui-col-sm-6 footer-nav-right">
            <div class="footer-nav-text">
              <i class="mdui-icon material-icons">arrow_forward</i>
              <span class="footer-nav-direction">Next</span>
              <div class="footer-nav-chapter">抽屉式导航</div>
            </div>
          </a>
    </div>
  </div>
</div>
<script src="../../cdn.w3cbus.com/library/mdui/1.0.2/js/mdui.min.js"></script><script src="../../cdn.w3cbus.com/mdui/docs_1/static/index.95ae2041.js"></script>
